<template>
  <div class="report">
    <bread-crumb
      :path="{ path: '/home' }"
      :titles="['首页', '数据展示', '数据报表']"
    ></bread-crumb>
    <el-card>
      <div id="main" style="width: 600px;height:400px;"></div>
    </el-card>
  </div>
</template>

<script>
import BreadCrumb from "@/components/BreadCrumb";
import echarts from "echarts";
export default {
  name: "Report",
  mounted() {
    let options = {};
    this.$http.get("reports/type/1").then(res => {
      options = res.data.data;
      console.log(options);
      var myChart = echarts.init(document.getElementById("main"));
      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(options);
    });
  },
  components: {
    BreadCrumb
  }
};
</script>

<style lang="scss" scoped></style>
